package com.onlyyou.storage.controller;

import com.onlyyou.storage.service.StorageService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Author: 小野
 * @Date: 2020/1/11 14:14
 */
@RestController
@Api(tags = "库存服务相关接口")
@RequestMapping("/")
@CrossOrigin
public class StorageController {

    @Autowired
    private StorageService iStorageService;

    @RequestMapping(value = "/insertStorage/{sku_id}/{inquanty}/{outquanty}")
    public Map<String, Object> insertStorage(@PathVariable("sku_id") String sku_id,
                                             @PathVariable("inquanty") double inquanty, @PathVariable("outquanty") double outquanty){
        return iStorageService.insertStorage(sku_id, inquanty, outquanty);
    }
    @GetMapping("/findAll")
    public String findAll(Integer page,Integer limit) {
        return "findAll";
    }
}
